<template>
  <div class="wrap">
    <Header :title="'新闻详情'" />
    <div class="detail-box">
      <div class="top">
        <div class="title">
          <h3>标题</h3>

        </div>
        <div class="post_time">
          <span>发表时间:2018-03-05</span>
          <span>点击:10次</span>
        </div>

      </div>
      <div class="pic_list">
        <!-- vue-preview 最新用法 -->
        <vue-preview :slides="slide1" @close="handleClose"></vue-preview>
      </div>
      <div class="detial">图片详情</div>


      <Tabbar />
    </div>
    <post />
  </div>
</template>
<script>
  import post from "../../comments/postComment.vue";
  import Header from "../../comments/header.vue";
  import Tabbar from "../../comments/tabbar.vue";
  export default {
    data(e) {
      //   console.log(e.$route.params.id)
      return {
        id: e.$route.params.id,
        slide1: [{
            src: "../../images/106st.png", //大图片
            msrc: "../../images/106st.png", //小图片
            alt: "picture1",
            title: "Image Caption 1",
            w: 600,
            h: 400
          },
          {
            src: "../../images/55st.png",
            msrc: "../../images/55st.png",
            alt: "picture1",
            title: "Image Caption 1",
            w: 600,
            h: 400
          },
          {
            src: "../../images/55st.png",
            msrc: "../../images/55st.png",
            alt: "picture1",
            title: "Image Caption 1",
            w: 600,
            h: 400
          },
          {
            src: "../../images/55st.png",
            msrc: "../../images/55st.png",
            alt: "picture1",
            title: "Image Caption 1",
            w: 600,
            h: 400
          }

        ]
      };
    },
    mounted() {},
    methods: {
      handleClose() {
        console.log("close event");
      }
    },
    components: {
      post: post,
      Header: Header,
      Tabbar: Tabbar
    }
  };
</script>
<style lang="scss" scoped>
  .wrap {
    min-height: 100%;
    margin-bottom: 60px;
  }

  .top {
    padding: 10px;
    border-bottom: 1px solid #ccc;
  }

  .title {
    h3 {
      text-align: center;
      color: blue;
    }
  }

  .post_time {
    display: flex;
    justify-content: space-between;
  }

  .pic_list {
    padding: 10px;

    img {
      width: 20%;
      height: 20%;
      margin-left: 10px;
      margin-top: 10px;
    }
  }

  .detial {
    padding: 0 20px;
    font-size: 14px;
  }
</style>